/**
 * Copyright (c) 2018, Alex. All rights reserved.
 */
package com.oschina.bottle.common.enums;

/**
 * 系统的基本返回码定义 code：返回码 msg: 提示信息
 *
 * @author <a href="mailto:zhongchao@gegejia.com">zhong</a>
 * @version 1.0 2018/1/4
 * @since 1.0
 */
public enum RtnCodeEnum implements MsgEnum<Long> {

    SUCCESS(0L, "success"), UNKNOWN_ERROR(-1L, "未知异常"),;

    private final Long code;
    private final String msg;

    RtnCodeEnum(Long code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
